<?php

use think\facade\Route;

//商城后端路由表
Route::group('admin', function () {
    //门店列表
    Route::any('AdminStore/storeList', 'AdminStore/storeList');
    //门店下拉框
    Route::any('AdminStore/storeSelect', 'AdminStore/storeSelect');
    //门店回显
    Route::any('AdminStore/storeInfo', 'AdminStore/storeInfo');
    //门店编辑
    Route::any('AdminStore/storeUpdate', 'AdminStore/storeUpdate');
    //批量
    Route::any('AdminStore/storeUpdateBatch', 'AdminStore/storeUpdateBatch');
    //员工下拉框
    Route::any('AdminStore/staffSelect', 'AdminStore/staffSelect');
    //员工添加
    Route::any('AdminStore/storeStaffAdd', 'AdminStore/storeStaffAdd');

    Route::any('AdminStore/storeStaffList', 'AdminStore/storeStaffList');

    Route::any('AdminStore/storeStaffUpdate', 'AdminStore/storeStaffUpdate');
    //设置管理员
    Route::any('AdminStore/setRole', 'AdminStore/setRole');
    //店员删除
    Route::any('AdminStore/storeStaffDel', 'AdminStore/storeStaffDel');
    //门店添加
    Route::any('AdminStore/storeAdd', 'AdminStore/storeAdd');

    Route::any('AdminStore/storeFrom', 'AdminStore/storeFrom');

    Route::any('AdminStore/storeTop', 'AdminStore/storeTop');

    Route::any('AdminStore/fromList', 'AdminStore/fromList');

    Route::any('AdminStore/storeConfig', 'AdminStore/storeConfig');
    //编辑门店配置信息
    Route::any('AdminStore/storeConfigUpdate', 'AdminStore/storeConfigUpdate');
    //配送费列表
    Route::any('AdminStore/deliveryList', 'AdminStore/deliveryList');
    //添加配送费
    Route::any('AdminStore/deliveryAdd', 'AdminStore/deliveryAdd');
    //编辑配送费
    Route::any('AdminStore/deliveryUpdate', 'AdminStore/deliveryUpdate');
    //分类列表
    Route::any('AdminCate/cateList', 'AdminCate/cateList');
    //分类添加
    Route::any('AdminCate/cateAdd', 'AdminCate/cateAdd');
    //分类编辑
    Route::any('AdminCate/cateUpdate', 'AdminCate/cateUpdate');
    //分类下拉框
    Route::any('AdminCate/cateSelect', 'AdminCate/cateSelect');
    //分类回显
    Route::any('AdminCate/cateInfo', 'AdminCate/cateInfo');
    //配置回显
    Route::any('AdminConfig/configInfo', 'AdminConfig/configInfo');
    //配置编辑
    Route::any('AdminConfig/configUpdate', 'AdminConfig/configUpdate');
    //商品列表
    Route::any('AdminGoods/goodsList', 'AdminGoods/goodsList');
    //商品添加
    Route::any('AdminGoods/goodsAdd', 'AdminGoods/goodsAdd');
    //同步
    Route::any('AdminGoods/withGoods', 'AdminGoods/withGoods');
    //删除
    Route::any('AdminGoods/goodsDel', 'AdminGoods/goodsDel');
    //商品回显
    Route::any('AdminGoods/goodsInfo', 'AdminGoods/goodsInfo');
    //商品编辑
    Route::any('AdminGoods/goodsUpdate', 'AdminGoods/goodsUpdate');
    //商品下拉框
    Route::any('AdminGoods/goodsSelect', 'AdminGoods/goodsSelect');
    //卡券列表
    Route::any('AdminCoupon/couponList', 'AdminCoupon/couponList');
    //卡券添加
    Route::any('AdminCoupon/couponAdd', 'AdminCoupon/couponAdd');
    //卡券回显
    Route::any('AdminCoupon/couponInfo', 'AdminCoupon/couponInfo');
    //卡券编辑
    Route::any('AdminCoupon/couponUpdate', 'AdminCoupon/couponUpdate');
    //上下架
    Route::any('AdminCoupon/statusUpdate', 'AdminCoupon/statusUpdate');
    //打印机列表
    Route::any('AdminPrinter/printerList', 'AdminPrinter/printerList');
    //添加打印机
    Route::any('AdminPrinter/printerAdd', 'AdminPrinter/printerAdd');
    //打印机详情
    Route::any('AdminPrinter/printerInfo', 'AdminPrinter/printerInfo');
    //打印机编辑
    Route::any('AdminPrinter/printerUpdate', 'AdminPrinter/printerUpdate');

    Route::any('AdminOrder/orderList', 'AdminOrder/orderList');

    Route::any('AdminOrder/orderInfo', 'AdminOrder/orderInfo');
    //退款订单列表
    Route::any('AdminOrder/refundOrderList', 'AdminOrder/refundOrderList');
    //退款订单详情
    Route::any('AdminOrder/refundOrderInfo', 'AdminOrder/refundOrderInfo');
    //后台同意退款
    Route::post('AdminOrder/agreeRefund', 'AdminOrder/agreeRefund');
    //后台拒绝退款
    Route::post('AdminOrder/noAgreeRefund', 'AdminOrder/noAgreeRefund');
    //添加桌号
    Route::post('AdminStore/tableAdd', 'AdminStore/tableAdd');
    //桌号列表
    Route::post('AdminStore/tableList', 'AdminStore/tableList');
    //桌号详情
    Route::post('AdminStore/tableInfo', 'AdminStore/tableInfo');
    //桌号编辑
    Route::post('AdminStore/tableUpdate', 'AdminStore/tableUpdate');
    //排班详情
    Route::post('AdminStore/classInfo', 'AdminStore/classInfo');
    //排班编辑classAdd
    Route::post('AdminStore/classUpdate', 'AdminStore/classUpdate');
    //班次列表
    Route::post('AdminStore/classList', 'AdminStore/classList');
    //添加班次
    Route::post('AdminStore/classAdd', 'AdminStore/classAdd');

    Route::any('AdminStore/getDataTitle', 'AdminStore/getDataTitle');

    Route::any('AdminStore/classDataList', 'AdminStore/classDataList');

    Route::any('AdminStore/updateClassData', 'AdminStore/updateClassData');
    //桌号下拉框
    Route::any('AdminStore/tableSelect', 'AdminStore/tableSelect');
    //班次下拉框
    Route::any('AdminStore/classSelect', 'AdminStore/classSelect');

    Route::any('AdminStore/classDataInfo', 'AdminStore/classDataInfo');
    //评价列表(store_id,limit)
    Route::get('AdminStore/evaluateList', 'AdminStore/evaluateList');
    //评价详情(id)
    Route::get('AdminStore/evaluateInfo', 'AdminStore/evaluateInfo');
    //获取好评差评数量(store_id,limit)
    Route::get('AdminStore/evaluateCount', 'AdminStore/evaluateCount');
    //删除评价（id ，status）
    Route::post('AdminStore/evaluateUpdate', 'AdminStore/evaluateUpdate');

    Route::post('AdminStore/tableQr', 'AdminStore/tableQr');

    Route::get('AdminStore/classDataListExcel', 'AdminStore/classDataListExcel');

});



//前端路由文件
Route::group('app', function () {

    //门店列表
    Route::any('IndexStore/storeList', 'IndexStore/storeList');
    //0不是员工 1店员 2管理员
    Route::any('IndexStore/checkRole', 'IndexStore/checkRole');

    Route::any('IndexStore/myStoreInfo', 'IndexStore/myStoreInfo');
    //绑定门店
    Route::any('IndexStore/selectStore', 'IndexStore/selectStore');

    Route::any('IndexStore/storeInfo', 'IndexStore/storeInfo');
    //首页
    Route::any('IndexGoods/index', 'IndexGoods/index');
    //分类
    Route::any('IndexGoods/cateList', 'IndexGoods/cateList');
    //点餐首页（cate_id 分类ID；type==1：外卖 2：堂食）
    Route::any('IndexGoods/goodsList', 'IndexGoods/goodsList');

    Route::any('IndexGoods/goodsSpe', 'IndexGoods/goodsSpe');
    //优惠券列表(不用传参数)
    Route::any('IndexCoupon/couponList', 'IndexCoupon/couponList');
    //领取优惠券(优惠券id  是个一维数组)
    Route::any('IndexCoupon/getCoupon', 'IndexCoupon/getCoupon');
    //卡券详情
    Route::any('IndexCoupon/couponInfo', 'IndexCoupon/couponInfo');

    Route::any('IndexCoupon/recordInfo', 'IndexCoupon/recordInfo');
    //用户优惠券列表
    Route::any('IndexCoupon/userCouponList', 'IndexCoupon/userCouponList');
    //购物车列表
    Route::any('IndexCar/carList', 'IndexCar/carList');
    //添加购物车(goods_id,spr_price_id,feeding:一维数组)
    Route::post('IndexCar/addCar', 'IndexCar/addCar');
    //加减购物车数量（id:购物车id，type1加、2减）
    Route::post('IndexCar/updateCar', 'IndexCar/updateCar');
	// 清空购物车
    Route::post('IndexCar/delCar', 'IndexCar/delCar');
    //去支付详情(type 1 外卖 2：堂食)
    Route::post('IndexOrder/payOrderInfo', 'IndexOrder/payOrderInfo');
    //支付
    Route::post('IndexOrder/payOrder', 'IndexOrder/payOrder');
    //加菜
    Route::post('IndexOrder/addOrderGoods', 'IndexOrder/addOrderGoods');
    //重新支付
    Route::post('IndexOrder/rePayOrder', 'IndexOrder/rePayOrder'); 
	//订单列表
    Route::post('IndexOrder/orderList', 'IndexOrder/orderList');
    //订单自提码
    Route::post('IndexOrder/orderQr', 'IndexOrder/orderQr');
    //用户可退款订单
    Route::post('IndexOrder/userCanRefundOrder', 'IndexOrder/userCanRefundOrder');
    //用户申请退款
    Route::post('IndexOrder/applyRefundOrder', 'IndexOrder/applyRefundOrder');
    //退款订单详情
    Route::post('IndexOrder/refundOrderInfo', 'IndexOrder/refundOrderInfo');
    //用户退款订单列表
    Route::post('IndexOrder/refundOrderList', 'IndexOrder/refundOrderList');
    //用户取消申请退款
    Route::post('IndexOrder/userCancelRefund', 'IndexOrder/userCancelRefund');
	//订单详情
    Route::post('IndexOrder/orderInfo', 'IndexOrder/orderInfo');
    //骑手信息
    Route::any('IndexOrder/transporterLocation', 'IndexOrder/transporterLocation');
    //用户确认收货
    Route::any('IndexOrder/userEndOrder', 'IndexOrder/userEndOrder');
    //取消订单
    Route::post('IndexOrder/cancelOrder', 'IndexOrder/cancelOrder');
    //用户添加评价(star,id,text,imgs)
    Route::post('IndexOrder/evaluateAdd', 'IndexOrder/evaluateAdd');
    //门店评价列表
    Route::get('IndexOrder/evaluateList', 'IndexOrder/evaluateList');
    //堂食先就餐后付款 支付接口 （id，coupon_id）
    Route::post('IndexOrder/underPayOrder', 'IndexOrder/underPayOrder');

    Route::get('IndexOrder/evaluateCount', 'IndexOrder/evaluateCount');
    //员工端订单列表（传参和用户端一样）
    Route::post('IndexSetting/staffOrderList', 'IndexSetting/staffOrderList');
    //管理员门店列表
    Route::post('IndexSetting/staffStoreInfo', 'IndexSetting/staffStoreInfo');
    //打印机列表
    Route::post('IndexSetting/printerList', 'IndexSetting/printerList');
    //添加打印机(传参和后台一样)
    Route::post('IndexSetting/printerAdd', 'IndexSetting/printerAdd');
    //编辑|删除打印机(传参和后台一样)
    Route::post('IndexSetting/printerUpdate', 'IndexSetting/printerUpdate');
    //编辑商品
    Route::post('IndexGoods/goodsUpdate', 'IndexGoods/goodsUpdate');

    Route::post('IndexGoods/haveMemberAuth', 'IndexGoods/haveMemberAuth');
    //营业数据
    Route::post('IndexSetting/listFrom', 'IndexSetting/listFrom');
    //商品排行(sort 1:价格排 2：销量排 ；day 0 :所有 1：今日)
    Route::post('IndexSetting/goodsTop', 'IndexSetting/goodsTop');

    Route::post('IndexSetting/storeUpdate', 'IndexSetting/storeUpdate');

    Route::post('IndexSetting/staffGoodsList', 'IndexSetting/staffGoodsList');

    Route::post('IndexSetting/goodsUpdate', 'IndexSetting/goodsUpdate');
    //核销自提订单
    Route::post('IndexSetting/selfOrderHx', 'IndexStaff/selfOrderHx');
    //商家发单
    Route::post('IndexSetting/acceptOrder', 'IndexSetting/acceptOrder');
    //商家同意退款
    Route::post('IndexSetting/agreeRefund', 'IndexSetting/agreeRefund');
    //拒绝退款
    Route::post('IndexSetting/noAgreeRefund', 'IndexSetting/noAgreeRefund');
    //商家取消骑手订单
    Route::post('IndexSetting/cancelSendOrder', 'IndexSetting/cancelSendOrder');
    //商家退款订单列表
    Route::any('IndexSetting/refundOrderList', 'IndexSetting/refundOrderList');
    //商家作为骑手接单接货
    Route::any('IndexSetting/riderGoodsUp', 'IndexSetting/riderGoodsUp');
    //商家作为骑手送货完成
    Route::any('IndexSetting/riderGoodsSuccess', 'IndexSetting/riderGoodsSuccess');
    //商家重新发单
    Route::any('IndexSetting/reAcceptOrder', 'IndexSetting/reAcceptOrder');
    //商家备货成功(传一个id，订单id)
    Route::any('IndexSetting/StoreStockUp', 'IndexSetting/StoreStockUp');
    //商家添加排班
    Route::any('IndexSetting/addClassData', 'IndexSetting/addClassData');
    //获取该天有哪些班次
    Route::any('IndexSetting/dateClass', 'IndexSetting/dateClass');
    //管理段端员工排班管理
    Route::any('IndexSetting/classDataList', 'IndexSetting/classDataList');
    //班次下拉
    Route::any('IndexSetting/classSelect', 'IndexSetting/classSelect');
    //添加桌号
    Route::post('IndexSetting/tableAdd', 'IndexSetting/tableAdd');
    //桌号列表
    Route::post('IndexSetting/tableList', 'IndexSetting/tableList');
    //桌号详情
    Route::post('IndexSetting/tableInfo', 'IndexSetting/tableInfo');
    //桌号编辑
    Route::post('IndexSetting/tableUpdate', 'IndexSetting/tableUpdate');
    //刷新桌号
    Route::post('IndexSetting/tableQr', 'IndexSetting/tableQr');
    //桌号下拉框
    Route::post('IndexSetting/tableSelect', 'IndexSetting/tableSelect');
    //排班员工下拉
    Route::post('IndexSetting/staffSelect', 'IndexSetting/staffSelect');
    //班次桌号下拉
    Route::post('IndexSetting/dateTableSelect', 'IndexSetting/dateTableSelect');
    //排班详情
    Route::post('IndexSetting/classInfo', 'IndexSetting/classInfo');
    //排班编辑classAdd
    Route::post('IndexSetting/classUpdate', 'IndexSetting/classUpdate');
    //班次列表
    Route::post('IndexSetting/classList', 'IndexSetting/classList');
    //添加班次
    Route::post('IndexSetting/classAdd', 'IndexSetting/classAdd');
    //管理员端和员工端端堂食订单(confirm = 0，pay_type=0待确认，pay_type=待付款,7已完成)
    Route::get('IndexStaff/houseOrderList', 'IndexStaff/houseOrderList');
    //处理订单(id)
    Route::post('IndexStaff/doConfirm', 'IndexStaff/doConfirm');
    //店员数据排名
    Route::get('IndexStaff/staffOrderTop', 'IndexStaff/staffOrderTop');
    //店员数据排名详情(staff_id)
    Route::get('IndexStaff/staffOrderTopInfo', 'IndexStaff/staffOrderTopInfo');
    //员工端确认支付（order_id,staff_text）
    Route::post('IndexStaff/endOrder', 'IndexStaff/endOrder');
    //员工端取消订单（order_id,staff_text）
    Route::post('IndexStaff/cancelOrder', 'IndexStaff/cancelOrder');
    //员工减菜接口（order_goods_id,num）
    Route::post('IndexStaff/delFoods', 'IndexStaff/delFoods');
    //员工端修改就餐人数(order_id,user_num)
    Route::post('IndexStaff/updateMealFee', 'IndexStaff/updateMealFee');
    //商家退款订单列表
    Route::any('IndexStaff/refundOrderList', 'IndexStaff/refundOrderList');



});


Route::any('SendResult/dadaSend', 'SendResult/dadaSend');

Route::any('SendResult/test', 'SendResult/test');














